- spriteBatch.Draw(Texture, Position, null, Color.White, Angle, Origin, 1f, SpriteEffects.None, 0f);
+ foreach (Actor child in Children)
+ {
+ child.Draw(spriteBatch);
+ }
+
+ spriteBatch.Draw(Texture, Position, null, Color, Angle, Origin, 1f, SpriteEffects.None, 0f);
+ spriteBatch.Draw(BoxTexture, Box, new Color(255, 0, 255, 25));
+ }
+
+ void CheckOutliers()
+ {
+ for (var i = Children.Count; i > 0; i--)
+ {
+ var actor = Children[i - 1];
+ if (actor.Position.X < -SuperPolarity.OutlierBounds || actor.Position.Y < -SuperPolarity.OutlierBounds ||
+ actor.Position.X > game.GraphicsDevice.Viewport.Width + SuperPolarity.OutlierBounds ||
+ actor.Position.Y > game.GraphicsDevice.Viewport.Height + SuperPolarity.OutlierBounds)
+ {
+ Children.Remove(actor);
+ }
+ }
+ }
+
+ public virtual void Collide(Actor other, Rectangle collision)
+ {
+ }
+
+ public void TakeDamage(int amount)
+ {
+ if (!Immortal)
+ {
+ HP = HP - amount;
+ if (HP < 0)
+ {
+ Die();
+ }
+ }
+ }
+
+ protected virtual void Die()
+ {
+ Dying = true;